Non-volatile memory systems, such as flash memory, are used in digital computing systems as a means to store data and have been widely adopted for use in consumer products. Flash memory may be found in different forms, for example in the form of a portable memory card that can be carried between host devices or as a solid state disk (SSD) embedded in a host device. These memory systems typically work with data units called “blocks” that can be written, read and erased by a storage manager often residing in the memory system.
When writing data to a conventional flash memory system, a host typically assigns unique logical addresses to sectors, clusters or other units of data within a continuous virtual address space of the memory system. The host writes data to, and reads data from, addresses within the logical address space of the memory system. The memory system then commonly maps data between the logical address space and the physical blocks or metablocks of the memory. The memory system keeps track of how the logical address space is mapped into the physical memory but the host is almost always unaware of this. The host keeps track of the addresses of its data files within the logical address space but the memory system usually operates without knowledge of this mapping.
Applications on a host, however, may not have access to information on the logical addresses, referred to herein as a logical block addresses (LBAs), that the host operating system has assigned to files, directories or system areas. Applications on a host may only have high level file system application programming interfaces (APIs). Thus host applications do not generally have direct access to the file system structures maintained by the host operating system and cannot determine how the storage device driver on the host will translate requests made via the APIs into LBAs for file writes.
In many instances, it is desirable for a storage device, such as a flash memory card, to perform operations such as encryption, data optimization, or other processing on a specific file. However, while storage devices have full visibility regarding sectors actually written to the card, they generally lack the processing power to parse and maintain the file system themselves. Furthermore, the assumption in host environments is that the host owns and maintains the file system, and thus data relating to file structures is not communicated to storage devices in a simple or timely manner. Further complicating matters, host applications typically do not have direct access to the file system structures maintained by the host operating system, and thus do not have the ability to directly communicate parameters such as LBA maps to the storage device.
One possible approach for providing LBA information to host applications is to use a host that is configured to give applications direct access to the storage device's logical address space. Such direct access to a storage device by a host application is generally not available in hosts such as portable handsets, and is limited in many personal computer (PC) operating systems as well. Another possible approach for providing LBA information to host applications is to use a storage device-based approach where the storage device is aware of the file system. In such a storage device-based approach, the storage device would need the ability to read and navigate the file system, monitor writes to a file, force flushing of host file system caches, and do look-up operations to find files within folders in the file system. This approach would be resource intensive and not particularly practical in storage devices such as flash memory cards with limited controller capabilities.